<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="./swiper-4.4.2/dist/css/swiper.css">
  <style>
    body {
      margin: 0;
    }
    .slide-demo {
      height: 300px;
      color: #fff;
    }
    .slide-demo:nth-child(2n){
      background: red;
      width: 100px;
    }
    .slide-demo:nth-child(2n-1) {
      background: black;
      width: 150px;
    }

  </style>
</head>
<body>
  <div class="swiper-container">
    <div class="swiper-wrapper">
      <div class="swiper-slide slide-demo">内容</div>
      <div class="swiper-slide slide-demo">内容</div>
      <div class="swiper-slide slide-demo">内容</div>
      <div class="swiper-slide slide-demo">内容</div>
      <div class="swiper-slide slide-demo">内容</div>
    </div>
  </div>

  <script src="./swiper-4.4.2/dist/js/swiper.js"></script>
  <script>
    new Swiper('.swiper-container', {
      freeMode: true,
      freeModeMomentum: false,
      slidesPerView: 'auto',
      spaceBetween: 10
    })
  
  </script>
</body>
</html>